package com.songcha.module_mine.ui.activity.teenager.mode

import android.app.Application
import com.songcha.library_base.interfaces.IApiResult
import com.songcha.library_base.mvvm.base.BaseRefreshViewModel
import com.songcha.library_base.mvvm.base.BaseViewModel
import com.songcha.library_business.bean.book.BookNetBean
import com.songcha.library_network.bean.BaseListDataBean

class TeenagerModeViewModel(app: Application):BaseRefreshViewModel<TeenagerModeRepository,BookNetBean>(app) {
    fun getTeenagerBook(){
        handleApiDataObserver(repository!!.getTeenagerBook(),object:IApiResult<BaseListDataBean<BookNetBean>>{
            override fun onSuccess(bean: BaseListDataBean<BookNetBean>) {
                handleDataListSuccess(bean.data)
            }
        },true)
    }
}